//
//  ShareView.m
//  Cup
//
//  Created by dllo on 15/4/27.
//  Copyright (c) 2015年 doll. All rights reserved.
//

#import "ShareView.h"
#import "dataBaseHandle.h"
@implementation ShareView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView
{
    //收藏按钮
    self.collect = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.collect setBackgroundImage:[UIImage imageNamed:@"iconfont-iconfontshoucang"] forState:UIControlStateNormal];
    self.collect.frame = CGRectMake(self.frame.size.width/2 - 90, 10, 30, 30);
    [self addSubview:self.collect];
    [_collect release];

    //收藏Label
    self.collectLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width/2 - 90, 50, 30, 10)];
    self.collectLabel.textAlignment = NSTextAlignmentCenter;
    self.collectLabel.text = @"收藏";
    self.collectLabel.font = [UIFont systemFontOfSize:10];
    [self addSubview:self.collectLabel];
    [_collectLabel release];

    //分享按钮
    self.share = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.share setBackgroundImage:[UIImage imageNamed:@"iconfont-fenxiang"] forState:UIControlStateNormal];
    self.share.frame = CGRectMake(self.frame.size.width/2 + 60, 10, 30, 30);
    [self addSubview:self.share];
    [_share release];
    
    //分享Label
    self.shareLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width/2 + 60, 50, 30, 10)];
    self.shareLabel.textAlignment = NSTextAlignmentCenter;
    self.shareLabel.text = @"分享";
    self.shareLabel.font = [UIFont systemFontOfSize:10];
    [self addSubview:self.shareLabel];
    [_shareLabel release];
    self.hidden = YES;
}

- (void)dealloc
{
    [_share release];
    [_shareLabel release];
    [_collectLabel release];
    [_collect release];
    [super dealloc];
}
@end
